home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / userbox / publicdomain / muiwbpattern / install < prev    next >
Text File  |  1996-07-14  |  4KB  |  175 lines

  1. ; $VER: MUIWBPattern English Install Script 1.2 (14.07.96) by Joe Carlson
  2.  
  3. ;-----------------------------------------------------------------------------
  4. ; This script may be localized by translating the quoted text below:
  5.  
  6. ; English Texts:
  7. (set InstallText  "Where should %s be installed?")
  8. (set CopyingText  "Copying %s to %s...")
  9. (set SelectText   "Please select the files to install.")
  10. (set ToolText     "Changing default tool of the startup icon to %s...")
  11. (set AskText      "Do you want %s installed?")
  12. (set StartupText  "the startup icon")
  13. (set DocText      "the documentation")
  14. (set CatalogText  "the catalogs")
  15. (set TransText    "%s install script results:")
  16.  
  17. ;-----------------  Do not edit anything past this line! ---------------------
  18.  
  19. (set ProgramText    "MUIWBPattern")
  20. (set OldProgramText "MUI_WBPattern")
  21. (set QuoteText      "\"%s\"")
  22.  
  23. ; Paths:
  24. (set DefPrefPath  (expandpath "SYS:Prefs"))
  25. (set DefStartPath (expandpath "SYS:WBStartup"))
  26. (set DefLocalePath "Locale:catalogs")
  27.  
  28. (transcript (TransText ProgramText))
  29.  
  30. (complete 0)
  31.  
  32. (set Pref-Path
  33.    (askdir
  34.       (prompt (InstallText (QuoteText ProgramText)))
  35.       (help @askdir-help)
  36.       (default DefPrefPath)
  37.       (newpath)
  38.    )
  39. )
  40.  
  41. (complete 10)
  42.  
  43. (set Startup-Path
  44.    (askdir
  45.       (prompt (InstallText StartupText))
  46.       (help @askdir-help)
  47.       (default DefStartPath)
  48.    )
  49. )
  50.  
  51. (complete 20)
  52.  
  53. (set @default-dest Pref-Path)
  54.  
  55. (set Pref-Name       (tackon Pref-Path ProgramText))
  56. (set Startup-Name    (tackon Startup-Path (cat ProgramText ".info")))
  57. (set OldPref-Name    (tackon Pref-Path OldProgramText))
  58. (set OldStartup-Name (tackon Startup-Path (cat OldProgramText ".info")))
  59.  
  60. ; Rename versions older than 1.2 to new names
  61. (if (exists OldPref-Name)
  62.    (rename OldPref-Name Pref-Name)
  63. )
  64. (if (exists (cat OldPref-Name ".info"))
  65.    (rename (cat OldPref-Name ".info") (cat Pref-Name ".info"))
  66. )
  67. (if (exists OldStartup-Name)
  68.    (rename OldStartup-Name Startup-Name)
  69. )
  70.  
  71. (set First-Time (NOT (exists Pref-Name)))
  72.  
  73. (copyfiles
  74.    (prompt (CopyingText (QuoteText ProgramText) (QuoteText Pref-Path)))
  75.     (source (tackon "Prefs" ProgramText))
  76.    (dest Pref-Path)
  77.    (if First-Time (infos) )   ; Don't loose old tooltypes if updating
  78.    (help @copyfiles-help)
  79. )
  80.  
  81. (complete 30)
  82.  
  83. (if First-Time
  84.    (tooltype
  85.       (dest Pref-Name)
  86.       (noposition)
  87.    )
  88. )
  89.  
  90. (complete 40)
  91.  
  92. (copyfiles
  93.     (prompt (CopyingText StartupText (QuoteText Startup-Path)))
  94.     (help @copyfiles-help)
  95.     (source "WBStartup/MUIWBPattern.info")
  96.     (dest Startup-Path)
  97. )
  98.  
  99. (complete 50)
  100.  
  101. (tooltype
  102.    (prompt (ToolText Pref-Name))
  103.    (dest (tackon Startup-Path ProgramText))
  104.    (setdefaulttool Pref-Name)
  105.    (noposition)
  106. )
  107.  
  108. (if
  109.    (askbool
  110.       (prompt (AskText DocText))
  111.       (help @askbool)
  112.    )
  113. ; Install Docs
  114.    (
  115.       (set Doc-Path
  116.          (askdir
  117.             (prompt (InstallText DocText))
  118.             (help @askdir-help)
  119.             (default @default-dest)
  120.          )
  121.       )
  122.       (complete 60)
  123.       (copyfiles
  124.          (prompt (SelectText DocText Doc-Path))
  125.          (help @copyfiles-help)
  126.          (source "")
  127.          (dest Doc-Path)
  128.          (infos)
  129.          (pattern "#?.guide")
  130.          (confirm 1)
  131.       )
  132.       (complete 70)
  133.       (tooltype
  134.          (dest (tackon Doc-Path "#?.guide"))
  135.          (setdefaulttool
  136.             (if (>= (getversion) 39)
  137.                "Multiview"
  138.                "Amigaguide"
  139.             )
  140.          )
  141.          (noposition)
  142.       )
  143.    )
  144. )
  145.  
  146. (complete 80)
  147.  
  148. (if
  149.    (askbool
  150.       (prompt (AskText CatalogText))
  151.       (help @askbool)
  152.    )
  153. ; Install Catalogs
  154.    (
  155.       (set Cat-Path
  156.          (askdir
  157.             (prompt (InstallText CatalogText))
  158.             (default DefLocalePath)
  159.             (help @default-dest)
  160.          )
  161.       )
  162.       (complete 90)
  163.       (copyfiles
  164.          (prompt (SelectText DocText Doc-Path))
  165.          (help @copyfiles-help)
  166.          (source "Catalogs")
  167.          (dest Cat-Path)
  168.          (all)
  169.          (confirm 1)
  170.      )
  171.   )
  172. )
  173.  
  174. (complete 100)
  175.